{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9a4a5f8f-d1fd-4124-ae11-f6b263c36452",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "# <center>Python程序设计基础<center>\n",
    "## <center>第四章 Python 数据结构<center>\n",
    " <center>沈万福<center>\n",
    " <center> 办公地点：第十教学楼414室<center>\n",
    " <center>tel:18822265292<center>\n",
    " <center>mail:wfshen@tju.edu.cn<center>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dcb58f74-c20e-4761-87ef-4a233ee58a19",
   "metadata": {
    "editable": true,
    "jp-MarkdownHeadingCollapsed": true,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## <center>内容摘要<center>\n",
    "<center> 一、列表 <cetner>\n",
    "<center> 二、元组  <center>\n",
    "<center> 三、字典   <center>\n",
    "<font size = 9><center> 四、集合  <center></font>\n",
    "    <center>      五、字符串    <center>\n",
    "<center> 六、序列   <center>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "731c7a48-36ba-4b0d-930b-5bd50858236c",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 集合\n",
    "-----\n",
    "### <font color = #DC143C> 集合的定义</font>    \n",
    "Python中的集合（set）与数学中的概念类似，用于**保存不重复的元素**，是一个非常实用的数据结构。\n",
    "- 集合的最大特点就是**唯一**。\n",
    "- 集合中的元素是**没有顺序的**，无法通过索引访问。\n",
    "- 集合中常见的操作有添加、删除、交集、并集、差集等。*\r"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d2d95817-76d9-4c26-a9bf-78088b6767ba",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": "skip"
    },
    "tags": []
   },
   "source": [
    "..."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eeb42f7e-e035-4072-a4b7-73f876f17903",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": "subslide"
    },
    "tags": []
   },
   "source": [
    "-----\n",
    "### <font color = #DC143C> 集合的创建</font>  \n",
    "- (1) 大括号对 `{}`：元素之间用逗号分隔开；\n",
    "- (2) 利用```set()```函数。\n",
    "  > 注意：空集合只能用set()来创建，而不能用花括号{}表示，因为Python将{}用于表示空字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0b6d3770-2f7c-43fc-9a4a-c6810a1dd2d2",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "e9f799d7-0f7f-4e53-bd68-d67f3425df7e",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": "skip"
    },
    "tags": []
   },
   "source": [
    "..."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
